home *** CD-ROM | disk | FTP | other *** search
- Message-ID: <960302.203405.15824@banshee.uunet.ca>
- Sender: nobody@banshee.uunet.ca
- Date: Sat, 02 Mar 1996 20:34:05 -0400
- X-Nntp-Posting-Host: tra25.travel-net.com
- Path: news.uunet.ca!tra25
- Newsgroups: comp.lang.c++
- From: ffisl@travel-net.com (Frantisek Fisl)
- Subject: NEWBIE QUE.: Compiler calling the wrong function???
- Organization: EnviroSoft
- X-Newsreader: News Xpress Version 1.0 Beta #4
-
- When I compile a file containing the following code, I get this error message:
- error C2660: 'GetDlgItem' : function does not take 1 parameters
-
- The function 'GetDlgItem' accepts one parameter as declared in MFC and two
- parameters as a API function. So I think it's the API function that's being
- called here. How do I make sure that the correct function (the MFC function)
- gets called here?
-
- void CPlmwinDoc::OnInputBmpNew()
- {
- CBMPDlg dlg;
-
- int itemIndex;
- CString BMPTypeText;
-
- CBMP* pBMPItem = new CBMP;
-
- // HERE'S WHERE THE ERROR OCCURS:
- itemIndex = ((CComboBox *)GetDlgItem(IDC_BMP))->GetCurSel();
- ((CComboBox *)GetDlgItem (IDC_BMP))->GetLBText(itemIndex, PTypeText);
-
- pBMPItem->SetBMPType(BMPTypeText);
- BMPList.AddTail (pBMPItem);
- }
-
- ----------------------------------------------------------
- v v
- Frantisek Fisl, B.A.Sc.
- ffisl@travel-net.com
- http://www.travel-net.com/~ffisl
-
- Ottawa, Ontario, Canada
- Tel. (613) 738-8628
- ----------------------------------------------------------
-